<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
   <title>课程添加</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
	<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
   	<script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
	<script type="text/JavaScript">
       $(function(){
           $('#form1').ajaxForm({
				//beforeSubmit:  function(){alert("before");},  // pre-submit callback
				success:       complete,  // post-submit callback
				error:function(){alert("error");},
				dataType: 'json'
			});
           
			function complete(data){
			if (data.status==1)
			{
				window.location='__URL__/coursedetail';
             }else{
				$('#result').html(data.info).show();
             }
		}
	});
	</script>
</head>
	<body>
	<!-- layout::Auth:header::0 -->
        	<div class="container-fluid">
     			<div class="row-fluid">
                	<!-- layout::Auth:leftmenu::0 -->
                    	<div class="span8">
                          <div class="hero-unit">
                            <h1>添加课程</h1>
                            <p style="font-size:12px">当前位置：
                            <a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                            <a href='__URL__/index' class="nowpositionhref">后台管理</a>>
                            <a href='__URL__/coursedetail' class="nowpositionhref">课程管理</a>>
                            <a href="__URL__/courseadd" class="nowpositionhref">添加课程</a>
                            </p>
                          </div>
                          <div id="result"></div>
                        <form id='form1' method="post" action="__URL__/courseadd_post" >
                        <table>
                        	<tr>
                            	<th>
                            <input type="text" name="number" placeholder="课程序号" class="input-xxlarge">
                            	</th>
                            </tr>
                            <tr>
                            	<th>
                            <input type="text" name="name" placeholder="课程名称" class="input-xxlarge">
                            	</th>
                            </tr>
                            <tr>
                            	<th class="pull-left">
                           		 <select name="departmentid">		
                            		<option>院系名称</option>							  
                                        <?php if(is_array($deplist)): $i = 0; $__LIST__ = $deplist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo["id"]); ?>><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                   </select>
                                  </th>
                            </tr>
                            <tr>
                            	<th class="pull-left">
                            <input type="submit" value="添加课程" class="btn btn-success">
                            	</th>
                            </tr>
                             </table> 
                            </form>
                          </div>
                        </div>
                      </div>
                   
                         
                          
</body>
</html>